home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 051a / tbav603.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1993-06-15  |  7KB  |  225 lines

  1. @echo off
  2. echo off
  3. cls
  4. echo        --- Thunderbyte Anti-Virus installation batch program ---
  5. echo.
  6.  
  7. rem     * Make sure that we can find the utilities in the current directory
  8. if not exist TBSCAN.EXE goto error1
  9.  
  10. rem     * Make sure that the user specified a destination path
  11. if %1X==X goto error2
  12.  
  13. rem     * Make sure the target path exists or can be created
  14. if exist %1\nul goto pathexists
  15. md %1
  16. if not exist %1\nul goto error3
  17. :pathexists
  18.  
  19. rem     * Make sure user did not type something like 'C:' :-)
  20. if exist %1\CONFIG.SYS goto error5
  21.  
  22. rem     * Copy the TBAV utilities if necessary
  23. if exist dummy.tst del dummy.tst >nul
  24. if exist %1\dummy.tst del %1\dummy.tst >nul
  25. echo TEST >%1\dummy.tst
  26. if exist dummy.tst goto filesexist
  27. if not exist %1\dummy.tst goto error4
  28. echo Copying files. Please wait...
  29. copy *.* %1 >nul
  30. echo.
  31. :filesexist
  32. del %1\dummy.tst >nul
  33. if not exist %1\docs.exe goto nopack
  34. %1\docs -o %1
  35. del %1\docs.exe >nul
  36. :nopack
  37.  
  38. rem     * DOS has no interactive batch file commands,
  39. rem     * so we create a special program to solve that!
  40. rem     * the 'garbage' in the echo command is program code
  41. rem     * to read a key into an errorlevel, we copy the program code
  42. rem     * into something executable.
  43. echo ═êα╧┤L═! >%1\ask.com
  44.  
  45. echo.
  46. echo TbSetup will now generate or update the Anti-Vir.Dat file
  47. echo of the directory %1
  48. pause
  49. rem     * create or update the Anti-Vir.Dat records of the TBAV utilities
  50. %1\TBSETUP %1
  51.  
  52. cls
  53. rem     * do not overwrite an existing TBAV setup.
  54. if exist %1\TBSTART.BAT goto ready
  55.  
  56. echo.
  57. echo The Thunderbyte Anti-Virus utilities have been copied to the destination
  58. echo directory. It is recommended to read the documentation of TBAV thoroughly
  59. echo and to make a customized setup. One of the advantages of the Thunderbyte
  60. echo Anti-Virus utilities is flexibility and the possibility to configure
  61. echo them to suit your needs in an optimal way.
  62. echo.
  63. echo This installation batch file helps you to setup the utilities in their
  64. echo most standard and non-customized way.
  65. echo Do you want to continue? (Y/n)
  66. %1\ask
  67. if not errorlevel 1 goto ready
  68.  
  69. rem     * make a backup of the AUTOEXEC.BAT file!
  70. echo.
  71. echo Backing up C:\AUTOEXEC.BAT to C:\AUTOEXEC.ORG...
  72. copy c:\autoexec.bat c:\autoexec.org >nul
  73.  
  74. rem     * create a TBSTART.BAT file in the TBAV directory.
  75. echo @echo off >%1\TBSTART.BAT
  76. echo echo off >>%1\TBSTART.BAT
  77.  
  78. echo.
  79. echo For easy access of the TBAV utilities it is recommended to put them
  80. echo into your PATH environment variable.
  81. echo Do you want to add %1 to your PATH statement? (Y/n)
  82. %1\ask
  83. if not errorlevel 1 goto dosetup
  84. rem     * add the PATH statement to the end of the AUTOEXEC.BAT file.
  85. echo PATH=%%PATH%%;%1 >>C:\AUTOEXEC.BAT
  86.  
  87. :dosetup
  88. echo.
  89. echo TbSetup will now process the C:\ drive to generate the Anti-Vir.Dat files.
  90. echo You may need to repeat this process for other drives.
  91. pause
  92. rem     * process the rest of the machine, but do not touch existing information!
  93. %1\TBSETUP newonly C:\
  94.  
  95. :tbdriver
  96. cls
  97. echo.
  98. echo The TBAV package contains some utilities that can be installed in the memory
  99. echo of your PC. Do you want to add them to your AUTOEXEC.BAT file? (Y/n)
  100. %1\ask
  101. if not errorlevel 1 goto autoscan
  102. rem     * create a TBSTART.BAT file in the TBAV directory.
  103. echo %1\tbdriver >>%1\TBSTART.BAT
  104.  
  105. echo.
  106. echo TBSCANX is a memory resident virus scanner.
  107. echo Do you want to install it? (Y/n)
  108. %1\ask
  109. if not errorlevel 1 goto tbcheck
  110. rem     * add the TbScanX statement to the TBSTART.BAT file.
  111. echo %1\tbscanx >>%1\TBSTART.BAT
  112.  
  113. :tbcheck
  114. echo.
  115. echo TBCHECK is a memory resident integrity checker.
  116. echo Do you want to install it? (Y/n)
  117. %1\ask
  118. if not errorlevel 1 goto tbmem
  119. rem     * add the TbCheck statement to the TBSTART.BAT file.
  120. echo %1\tbcheck >>%1\TBSTART.BAT
  121.  
  122. :tbmem
  123. echo.
  124. echo TBMEM is a resident memory guard.
  125. echo Do you want to install it? (Y/n)
  126. %1\ask
  127. if not errorlevel 1 goto tbfile
  128. rem     * add the TbMem statement to the TBSTART.BAT file.
  129. echo %1\tbmem >>%1\TBSTART.BAT
  130.  
  131. :tbfile
  132. echo.
  133. echo TBFILE is a resident file guard.
  134. echo Do you want to install it? (Y/n)
  135. %1\ask
  136. if not errorlevel 1 goto autoscan
  137. rem     * add the TbFile statement to the TBSTART.BAT file.
  138. echo %1\tbfile >>%1\TBSTART.BAT
  139.  
  140. :autoscan
  141. echo.
  142. echo Do you want the system to be scanned automatically for viruses every day? (Y/n)
  143. %1\ask
  144. if not errorlevel 1 goto addcall
  145. rem     * add the TbScan statement to the TBSTART.BAT file.
  146. echo %1\tbscan once C:\ >>%1\TBSTART.BAT
  147.  
  148. :addcall
  149. if exist C:\TEMP.BAT del C:\TEMP.BAT >nul
  150. echo call %1\TBSTART.BAT >C:\TEMP.BAT
  151. copy /a C:\TEMP.BAT + C:\AUTOEXEC.BAT C:\TEMP2.BAT >nul
  152. copy C:\TEMP2.BAT C:\AUTOEXEC.BAT >nul
  153. del C:\TEMP.BAT >nul
  154. del C:\TEMP2.BAT >nul
  155.  
  156. :ready
  157. echo.
  158. echo Do you want to scan the C:\ disk now? (Y/n)
  159. %1\ask
  160. if not errorlevel 1 goto starttbav
  161. %1\tbscan C:\
  162.  
  163. :starttbav
  164. cls
  165. echo.
  166. echo TbSetup has been used to setup disk C:\. If your system has additional
  167. echo disk partitions, you have to use TBSETUP on your other disks as well.
  168. echo Consult the documentation for more information!
  169. echo.
  170. echo The menu program TBAV.EXE can be used to read the documentation files.
  171. echo Do you want to start TBAV now? (Y/n)
  172. %1\ask
  173. if not errorlevel 1 goto end
  174. %1\TBAV
  175. goto end
  176.  
  177. :error1
  178. echo Error: Invalid program invocation!
  179. echo.
  180. echo Make sure that you invoke INSTALL.BAT in the directory where the
  181. echo TBAV utilities can be found!
  182. echo.
  183. echo Example: if the TBAV utilities can be found on drive A:, you should type:
  184. echo A: [enter]
  185. echo INSTALL [path] [enter]
  186. goto end
  187.  
  188. :error2
  189. echo Error: No destination path specified!
  190. echo.
  191. echo You have to specify the destination path for the TBAV utilities!
  192. echo Even if the utilities are already in the destination path.
  193. echo.
  194. echo Example:
  195. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  196. echo INSTALL C:\TBAV
  197. goto end
  198.  
  199. :error3
  200. echo Error: Unable to creat destination directory %1
  201. echo.
  202. echo Make sure you enter an existing destination path or a path that can be created!
  203. goto end
  204.  
  205. :error4
  206. echo Error: Unable to copy files in directory %1
  207. echo.
  208. echo Disk full? Access denied?
  209. goto end
  210.  
  211. :error5
  212. echo Error: No target directory specified!
  213. echo.
  214. echo Make sure you enter a full destination path!
  215. echo %1 is not sufficient!
  216. echo.
  217. echo Example:
  218. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  219. echo INSTALL C:\TBAV
  220. goto end
  221.  
  222. :end
  223. if exist %1\ask.com del %1\ask.com >nul
  224.  
  225.